import { DataTypes } from "sequelize";
import seq from "../db/seq.js";

const User = seq.define(
  "share_user",
  {
    user_name: {
      type: DataTypes.STRING,
      unique: true,
      allowNull: false,
    },
    password: {
      type: DataTypes.CHAR(64),
      allowNull: false,
    },
    isAdmain: {
      type: DataTypes.BOOLEAN,
      allowNull: true,
      defaultValue: false,
    },
  },
  {
    // timestamps: false,
  }
);

export default User;

User.sync({ force: true });
